#ifndef _SDK_LIGHT_MODEL_H_
#define _SDK_LIGHT_MODEL_H_

#include "sdk_common.h"

#define SDK_MODEL_LIGHT_PARAMS_LEN_MAX  4


typedef enum{
    enum_light_ctl_cw=0,
    enum_light_ctl_color=1,
    enum_light_ctl_sence=2,
    enum_light_ctl_mutil_sw=3,
    enum_light_ctl_rythem_cw =4,
    enum_light_ctl_rythem_color=5,
    enum_light_ctl_rgb_mode=6
}ENUM_LIGHT_CTL_TYPE;



struct sdk_light_cw_st{
    uint16_t addr;
    uint8_t onoff;
    uint8_t colortemp;
    uint8_t lnss;
};

struct sdk_light_color_st{
    uint16_t addr;
    uint8_t onoff;
    uint16_t h;
    uint8_t s;
    uint8_t b;
};

struct sdk_light_sence_st{
    uint16_t addr;
    uint8_t onoff;
    uint16_t senceid;
};


struct sdk_light_rgbmode_st{
    uint16_t addr;
    uint8_t mode;
    uint8_t speed;
};


struct sdk_light_multisw_st {
    uint16_t addr;
    uint8_t onoff;
    uint8_t bitStatus;    
};


typedef union sdk_model_light_data_t
{
    struct sdk_light_cw_st cw;
    struct sdk_light_color_st color;
    struct sdk_light_sence_st sence;
    struct sdk_light_multisw_st multisw;
    struct sdk_light_rgbmode_st rgbmode;
}O_LIGHT_DATA,*P_LIGHT_DATA;


#define SDK_LIGHT_CTL_ATTRID      0x1007
#define SDK_LIGHT_RGBMODE_ATTRID  0x1022








int sdk_model_light_ctl(ENUM_LIGHT_CTL_TYPE type,P_LIGHT_DATA data);




#endif

